package com.huidan.cms.api.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * hello接口
 * Created by Administrator on 2017/10/24.
 */
@Controller
@RequestMapping("hello")
public class HelloWordController {

    /**
     * hellor测试
     * @return
     */
    @RequestMapping("word")
    @ResponseBody String hello() {
        return "helloWord";
    }

    /**
     * 测试返回对象格式
     * @return
     */
    @RequestMapping("map")
    Map helloMap() {
        Map result = new HashMap();
        result.put("one", 1);
        return result;
    }
}
